

from django.db import models

# Create your models here.
class Employee(models.Model):
    gender_choices=(
        (0,'男性'),
        (1,'女性'),
        (2,'不明'),
    )
    name=models.CharField(max_length=100)
    password=models.CharField(max_length=100)
    gender=models.SmallIntegerField(choices=gender_choices,default=0)
    phone=models.CharField(max_length=11,null=True,blank=True)
    pic=models.ImageField(upload_to='pic',default='pic/1,phg')
    class Meter:
        db_table="bz_employee"
        verbose_name="员工"
        verbose_name_plural=verbose_name

    def __abs__(self):
        return self.name
